﻿using System;
using System.Collections.Generic;
using System.Text;

namespace NGE
{
    [Serializable]
    public class NText : NFile
    {
        [Serializable]
        public enum Language
        {
            Chinese,
            English,
            Japanese,
        }

        public NText()
        { 
        }

        Language lang = Language.Chinese;

        List<string> CN = new List<string>();
        List<string> EN = new List<string>();
        List<string> JP = new List<string>();

        public void SetLanguage(Language lang)
        {
            this.lang = lang;
        }

        public string this[int index]
        {
            get
            {
                if (lang == Language.Chinese)
                {
                    return CN[index];
                }
                else if (lang == Language.English)
                {
                    return EN[index];
                }
                else if (lang == Language.Japanese)
                {
                    return JP[index];
                }
                return null;
            }
        }

        public int Add(string cn, string en, string jp)
        {
            CN.Add(cn);
            EN.Add(en);
            JP.Add(jp);

            return CN.Count;
        }
    }
}
